<include file="Layout/header" title="添加用户" />
<include file="Layout/sidebar" />
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            用户管理
            <small>添加用户</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
            <li class="active">添加用户</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <script src="__PLUGIN__/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
        <link rel="stylesheet" href="__PLUGIN__/bootstrapvalidator/css/bootstrapValidator.min.css">
        <!-- Horizontal Form -->
        <div class="box box-info" style="width:90%;margin: 0 auto;">
            <div class="box-header with-border">
                <h3 class="box-title">用户参数</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" action="" method="post">
                <div class="box-body">
                    <div class="form-group">
                        <label for="username" class="col-sm-2 control-label">用户名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="username" name="username" placeholder="用户名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="password" class="col-sm-2 control-label">用户密码</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="password" name="password" placeholder="用户密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-sm-2 control-label">电子邮箱</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="email" name="email" placeholder="电子邮箱">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="remark" class="col-sm-2 control-label">用户备注</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" id="remark" name="remark" rows="3" placeholder="用户备注 ..."></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户角色</label>
                        <div class="col-sm-10">
                            <div class="radio">
                                <label>
                                    <input type="radio" name="role_id" id="role_id" value="2" checked>
                                    普通管理员
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="role_id" id="role_id" value="1">
                                    超级管理员
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="reset" class="btn btn-default">重置</button>
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script type="text/javascript">
    //jQuery代码
    $(function () {
        $('form').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                username: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '用户名称不能为空'
                        }
                    }
                },
                password: {
                    validators: {
                        notEmpty: {
                            message: '用户密码不能为空'
                        }
                    }
                },
                email: {
                    validators: {
                        notEmpty: {
                            message: '用户邮箱不能为空'
                        },
                        emailAddress: {
                            message: '邮箱地址格式有误'
                        }
                    }
                }
            }
        });
    });
</script>
<include file="Layout/footer" />